Repository navigation
chore: gitsheets 2.7 — retire the stale-sheet workarounds - #200
Merged
Merged
Conversation
themightychris
added a commit
that referenced
this pull request
Oct 14, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
npm install gitsheets@^2.7.0 -w apps/api Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gitsheets 2.3+ auto-refreshes standing sheets after a transact and exposes refresh() and withLock(). Specify reads as fresh after our own writes and after reconcile's refresh; hot reload running its ref move, rebuild and swap under the transact mutex; a served-branch-only webhook; reconcile pushes going through the push daemon; and ETag/304 on attachments. Retires the caching-limitation section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No write path ever took dataRepoLock, so the hot-reload webhook could race a transact, and the rebuild ran after the lock was released, so a write landing mid-rebuild could be overwritten by the swap. Reconcile and the rebuild now run in one repo.withLock (the transact mutex), with the fetch outside it. Also: refresh the public store whenever reconcile moves the branch, which fixes boot serving the pre-fast-forward tree; reload revocations on hot reload; hand reconcile's pushes to the push daemon; reject a webhook branch other than CFP_DATA_BRANCH. Deletes data-repo-lock and Store.swapPublic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces the raw git cat-file spawn (a workaround for stale sheet snapshots) with sheet.getAttachment. The blob hash is the ETag, so a revalidation is a 304 without reading the blob; an empty blob is now a 200 instead of a 404. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- stripNullish/asValidator: gitsheets drops null keys itself and takes Zod schemas as Standard Schema with no cast. - sheet-indices: 25 defineIndex definitions nothing queried; under auto-refresh they'd be rebuilt after every write. - writeBlob before setAttachments: attachments accept Buffers. - account-claim test reads slug-history through the sheet, now fresh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
themightychris
force-pushed
the
chore/gitsheets-2.7
branch
from
October 14, 2026 02:26
1c6c548 to
de0f5de
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements
plans/gitsheets-freshness.md(the second half of #150). Stacked on #199 so tests run against production's sheet configs.Bump:
gitsheets^2.2.0 → ^2.7.0, with core-napi 0.1 → 0.5. As of 2.7, records are read in the native core instead of onegitprocess per record, which helps boot and hot reload.Bugs fixed:
dataRepoLock, and the rebuild ran after the lock was released, so a write landing mid-reload could be overwritten by the swap. Now the ref move, refresh, rebuild and swap all run insiderepo.withLock(the mutextransactholds). The fetch runs outside the lock so a slow network never blocks writes.notifyCommit).branchother thanCFP_DATA_BRANCHnow gets a 400.sheet.getAttachment, with the blob hash asETagand 304 on revalidation.Removed:
data-repo-lock.ts,Store.swapPublic,stripNullish/asValidator(gitsheets drops null keys itself and takes the Zod schemas without a cast; the map issatisfies ValidatorMap),sheet-indices.ts(25 indexes nothing queried), and the separatewriteBlobstep.Spec:
storage.mdgets a read-freshness section in place of the caching limitation, plus the write-locked hot reload, the served-branch-only webhook, daemon-only pushes and attachment ETags.Validation: type-check, lint and the full suite pass (497 API tests), including new tests for the race, the boot fast-forward, revocation reload, branch rejection, the push hand-off and ETag/304. Still to do: a sandbox boot and a hot-reload round trip.
🤖 Generated with Claude Code